package com.ustc.hewei.loginmodule.utils;

import cn.hutool.core.util.StrUtil;

/**
* @description: TODO
* @author hewei
* @date 2022/10/5 21:28
* @version 1.0
*/

public class RegexUtils {

    public static boolean isValidPhone(String phone) {
        return isMatch(phone, RegexPatterns.PHONE_REGEX);
    }

    private static boolean isMatch(String phone, String regex) {
        if (StrUtil.isBlank(phone)) return false;
        return phone.matches(regex);
    }
}
